package com.sk.bilibili.event;

import com.sk.bilibili.bean.Video;

import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class VideoSetEvent {

    // 0播放事件    1 关闭 事件      2 全屏切换事件   3 更多操作    4 切换视频
    private Integer type;
    // 是否播放
    private Boolean play;
    private Video video;

    private VideoSetEvent() {
    }

    public static VideoSetEvent playEvent(Boolean play){
        return new VideoSetEvent().setPlay(play).setType(0);
    }

    public static VideoSetEvent closeEvent(){
        return new VideoSetEvent().setType(1);
    }

    public static VideoSetEvent fullScreen(){
        return new VideoSetEvent().setType(2);
    }

    public static VideoSetEvent moreEvent(){
        return new VideoSetEvent().setType(3);
    }

    public static VideoSetEvent changeVideo(Video video){
        return new VideoSetEvent().setType(4).setVideo(video);
    }

}